#include <stdio.h>

int main(){ 

	/* members declaration */

	double operand1;
	double operand2;
	char action;


	/* get data from user */

	printf("<-- Welcome to my calculator -->\n");
	printf("Enter data you want to calculate \n");
	printf("For Example: 25*25\n\n");
	scanf("%lf%c%lf", &operand1, &action, &operand2);


	// Switch case check the action that user want to perform.

	switch(action){

	case '*' :{
		double result = operand1 * operand2;
		printf("The result is: %2.2lf\n", result);
		break;
			  }

	case '+':{
		double result = operand1 + operand2;
		printf("The result is: %2.2lf\n", result);
		break;
			 }

	case '-':{
		double result = operand1 - operand2;
		printf("The result is: %2.2lf\n", result);
		break;
			 }

	case '/':{
		if(operand2 == 0){
			printf("Unable to divide by 0\n");
			return -1;
		}
		else{
			double result = operand1 / operand2;
			printf("The result is: %2.2lf\n", result);
			break;
		 }
			 }
	default:
		printf("Invalid action\n");
		return -1;
	}

	return 0;
}